package com.baidu.mapapi;

public class c
{
  private static char[] a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".toCharArray();
  private static byte[] b = new byte[256];

  static
  {
    for (int i = 0; i < 256; i++)
      b[i] = -1;
    for (int j = 65; j <= 90; j++)
      b[j] = ((byte)(j - 65));
    for (int k = 97; k <= 122; k++)
      b[k] = ((byte)(-97 + (k + 26)));
    for (int m = 48; m <= 57; m++)
      b[m] = ((byte)(-48 + (m + 52)));
    b[43] = 62;
    b[47] = 63;
  }

  public static char[] a(char[] paramArrayOfChar)
  {
    char[] arrayOfChar1 = new char[4 * ((2 + paramArrayOfChar.length) / 3)];
    int i = 0;
    int j = 0;
    int k;
    if (j < paramArrayOfChar.length)
    {
      k = (0xFF & paramArrayOfChar[j]) << '\b';
      if (j + 1 >= paramArrayOfChar.length)
        break label232;
      k |= 0xFF & paramArrayOfChar[(j + 1)];
    }
    label217: label232: for (int m = 1; ; m = 0)
    {
      int n = k << 8;
      if (j + 2 < paramArrayOfChar.length)
        n |= 0xFF & paramArrayOfChar[(j + 2)];
      for (int i1 = 1; ; i1 = 0)
      {
        int i2 = i + 3;
        char[] arrayOfChar2 = a;
        int i3;
        label112: int i4;
        int i5;
        char[] arrayOfChar3;
        if (i1 != 0)
        {
          i3 = n & 0x3F;
          arrayOfChar1[i2] = arrayOfChar2[i3];
          i4 = n >> 6;
          i5 = i + 2;
          arrayOfChar3 = a;
          if (m == 0)
            break label217;
        }
        for (int i6 = i4 & 0x3F; ; i6 = 64)
        {
          arrayOfChar1[i5] = arrayOfChar3[i6];
          int i7 = i4 >> 6;
          arrayOfChar1[(i + 1)] = a[(i7 & 0x3F)];
          int i8 = i7 >> 6;
          arrayOfChar1[(i + 0)] = a[(i8 & 0x3F)];
          j += 3;
          i += 4;
          break;
          i3 = 64;
          break label112;
        }
        return arrayOfChar1;
      }
    }
  }

  public static char[] b(char[] paramArrayOfChar)
  {
    int i = 0;
    int j = 3 * ((3 + paramArrayOfChar.length) / 4);
    if ((paramArrayOfChar.length > 0) && (paramArrayOfChar[(-1 + paramArrayOfChar.length)] == '='))
      j--;
    if ((paramArrayOfChar.length > 1) && (paramArrayOfChar[(-2 + paramArrayOfChar.length)] == '='))
      j--;
    char[] arrayOfChar = new char[j];
    int k = 0;
    int m = 0;
    int n = 0;
    int i3;
    int i4;
    if (k < paramArrayOfChar.length)
    {
      int i1 = b[(0xFF & paramArrayOfChar[k])];
      if (i1 >= 0)
      {
        int i2 = m << 6;
        i3 = n + 6;
        i4 = i2 | i1;
        if (i3 < 8)
          break label178;
        int i5 = i3 - 8;
        int i6 = i + 1;
        arrayOfChar[i] = ((char)(0xFF & i4 >> i5));
        i = i6;
        m = i4;
        n = i5;
      }
    }
    while (true)
    {
      k++;
      break;
      if (i != arrayOfChar.length)
        throw new Error("miscalculated data length!");
      return arrayOfChar;
      label178: n = i3;
      m = i4;
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.baidu.mapapi.c
 * JD-Core Version:    0.6.2
 */